package cn.icatw.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * gulimall网络配置
 *
 * @author icatw
 * @date 2022/3/21
 * @email 762188827@qq.com
 * @apiNote
 */
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {
    /**
     * 添加视图控制器
     * 发送一个请求直接跳转到一个页面
     * SpringMvc viewController：将请求和页面映射过来
     *
     * @param registry 注册表
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");
    }
}
